﻿<!DOCTYPE html>
<html>
<head>
<title>知识库</title>
<vt:include file="inc/meta.inc" />
<script type="text/javascript" src="Scripts/Knowledges.js?ver={$version}"></script>
<link href="Styles/Knowledges.css?ver={$version}" rel="stylesheet" type="text/css" />
</head>
<body  canStudy="{$canStudy}">
<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable mui-scalable"> 
  <!--侧滑菜单部分-->
  <aside id="offCanvasSide" class="mui-off-canvas-left study-menu">
    <div id="offCanvasSideScroll" class="mui-scroll-wrapper">
      <div class="mui-scroll">
        <div class="cour-info">
      <vt:function var="path" method="Path" args="Course"/>
        <img class="default-img" src="{$path}{$course.Cou_LogoSmall}" default="images/cou_nophoto.jpg" />
        <div class="cour-info-right">
        <cour-name>{$course.Cou_Name}</cour-name>
        <sbj-name>{$course.Sbj_Name}</sbj-name>
        </div>
      </div>
        <ul class="mui-table-view mui-table-view-chevron mui-table-view-inverted">
          <vt:foreach from="$#.kns" item="data" index="i" remark="栏目">
            <li class="mui-table-view-cell" knsid="{$:#.data.kns_id}"> <a class="mui-navigate-right" href="Knowledges.ashx?couid={$couid}&sorts={$:#.data.kns_id}"> <span class="rowico">{$:#.data.tree}</span>{$:#.data.kns_name} </a> </li>
          </vt:foreach>
        </ul>
      </div>
      <!-- 上面的侧滑菜单--> 
      
    </div>
  </aside>
  <script>
    mui.init();
    //侧滑容器父节点
    var offCanvasWrapper = mui('#offCanvasWrapper');
    //主界面容器
    var offCanvasInner = offCanvasWrapper[0].querySelector('.mui-inner-wrap');
    //菜单容器
    var offCanvasSide = document.getElementById("offCanvasSide");
    if (!mui.os.android) {
        var spans = document.querySelectorAll('.android-only');
        for (var i = 0, len = spans.length; i < len; i++) {
            spans[i].style.display = "none";
        }
    }	
    //移动效果是否为整体移动
    var moveTogether = false;
    //侧滑容器的class列表，增加.mui-slide-in即可实现菜单移动、主界面不动的效果；
    var classList = offCanvasWrapper[0].classList;
    //主界面和侧滑菜单界面均支持区域滚动；
    mui('#offCanvasSideScroll').scroll();
    mui('#offCanvasContentScroll').scroll();
	mui.ready(function(){
		mui('.mui-scroll-wrapper').scroll({deceleration: 0.0005});
	});	
    //实现ios平台原生侧滑关闭页面；
    if (mui.os.plus && mui.os.ios) {
        mui.plusReady(function () { //5+ iOS暂时无法屏蔽popGesture时传递touch事件，故该demo直接屏蔽popGesture功能
            plus.webview.currentWebview().setStyle({
                'popGesture': 'none'
            });
        });
    }
    $("#offCanvasSide img").error(function () {
        var errImg = $(this).attr("default");
        if (errImg == null) return false;
        $(this).attr("src", errImg);
    });
    //左侧滑菜单的链接事件
    mui('body').on('tap', '#offCanvasSide a', function () {
        var type = this.getAttribute("type");
        //如果超链接，直接跳走
        if (type == "link" || type == null) document.location.href = this.href;        
    });
   //当前章节的样式
	$("#offCanvasSide li").each(function () {
		var olid=$().getPara("sorts");	//当前分类id
		//如果没有olid参数，则第一个为当前章节
		if(olid==null || olid==""){			
			$(".outline:first").addClass("current");
			return false;
		}
        var currid = $(this).attr("knsid");
		var current=currid == olid ? $(this) : null;
		if(current==null)return true;		
        current.addClass("current");		
    });
</script> 
  <!--主界面部分-->
  <div class="mui-inner-wrap">
    <div class="mui-content mui-scroll-wrapper" id="pullrefresh"> 
      <!--下拉刷新容器-->
      <div class="mui-scroll">
        <ul id="detail-view" class="mui-table-view">
        </ul>
      </div>
    </div>
    
    <!-- off-canvas backdrop -->
    <div class="mui-off-canvas-backdrop"> </div>
  </div>
  <!--主界面结束--> 
</div>
 <vt:include file="inc/KnowledgesFooter.html" />
</body>
</html>